<?php
class Admin extends MY_Controller {

	// 	var $secure = 1;
	function __construct() {
		parent::__construct();
		
		$this->template->set_template('admin');
	}

	public function index() {
		
		$data = array ();
		
		$this->template->parse_view('leftmenu', 'view_leftmenu', $data);
		$this->template->parse_view('content', 'view_control', $data);
		$this->template->render();
	}
	
	public function  add_user($fullname = '', $username = '', $password = '',
			$NRICPassport = '', $address = '', $postCode = '', $phone = '', $alterPhone = '', $email = '', $passwordRetyped = '') {
		
		$data = array ();
		$data['user'] = array(
				'fullname' => $fullname,
				'username' => $username,
				'password' => $password,
				'NRICPassport' => $NRICPassport,
				'address' => $address,
				'postCode' => $postCode,
				'phone' => $phone,
				'alterPhone' => $alterPhone,
				'email' => $email,
				);
		$data['mode'] = 'new'; 
		$data['passwordRetyped'] = $passwordRetyped;
		
		$this->template->parse_view('leftmenu', 'view_leftmenu', $data);
		$this->template->parse_view('content', 'admin/view_add_user', $data);
		$this->template->render();
	}
	
	public function list_user () {
		
		$data = array ();
		
		$this->template->parse_view('leftmenu', 'view_leftmenu', $data);
		$this->template->parse_view('content', 'view_control', $data);
		$this->template->render();
	}
	
	
}